const express = require('express');

var server = express();

server.listen(8080);

//如何获取GET:   req.query
server.get('/',function(req,res){
    // http://localhost:8080/login?username=lisi&pwd=123
    console.log(req.query);
})

//POST数据POST数据
const bodyParser = require('body-parser');
server.use(bodyParser.urlencoded({}));
server.post('/',function(req,res){
    console.log(req.body);
})
